<%--                                                                       --%>
<%-- Copyright (c) 2001-2004 BroadVision, Inc.  All rights reserved.       --%>
<%--                                                                       --%>
<%-- This software is copyrighted. Under the copyright laws, this software --%>
<%-- may not be copied, in whole or in part, without prior written consent --%>
<%-- of BroadVision, Inc. or its assignees. This software is provided      --%>
<%-- under the terms of a license between BroadVision and the recipient,   --%>
<%-- and its use is subject to the terms of that license.                  --%>
<%--                                                                       --%>
<%-- This software may be protected by one or more U.S. and International  --%>
<%-- patents.  Certain applications of BroadVision One-To-One software are --%>
<%-- covered by U.S. patent 5,710,887.                                     --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and BroadVision One-To-One are registered     --%>
<%-- trademarks of BroadVision, Inc., in the United States and the         --%>
<%-- European Community, and are trademarks of BroadVision, Inc., in other --%>
<%-- countries.  The BroadVision logo, is a trademark of BroadVision,      --%>
<%-- Inc., in the United States and other countries.                       --%>
<%--                                                                       --%>

<%@ page language="java" %>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> 
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> 
<%@ taglib uri="/WEB-INF/bv-html.tld" prefix="bvhtml" %>

<jsp:useBean id="groupListView" scope="request" type="com.broadvision.web.util.ViewDynaBean"/> 
<script language="JavaScript">
<!--

function confirmDeleteGroup()
{
   if (confirm('<bean:message key="cs.confirm.delete.group"/>'))
   {
      return true;
   }
   else
   {
      return false;
   }
}

// -->
</script>

<!-- Zone 5 starts here.  -->
<table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0" 
         summary="content area">
  <tr>
    <td valign="top">
    
    <div class="pageTitle">
      <%@ include file="/cs/microsite/micrositeNaviInfo.jsp" %>
    </div> 
    
    <!--end page title area here-->
    
    <div class="pageSubtitle">
      <span class="left">
        <bean:message key="cs.groups.index"/>
      </span>
      <span class="right">
        <html:form action="/cs/groupEdit.do">
        <bvhtml:hiddenList name="micrositeNaviInfoView" property="urlParams" scope="request"/>
          <html:submit styleClass="titleButton" property="createNewBtn">
            <bean:message key="button.createNew"/>
          </html:submit>
        </html:form>
      </span>
    </div> 

    <!--end title bar here-->

    <div class="blockWrap">

    <!-- Start List here -->
    <table class="dataTable" border="0" cellspacing="1" cellpadding="2" 
           summary="Search result table" width="100%">
      <tr class="listHeader"> 
        <th id="Name" align="left"><bean:message key="cs.name"/></th>
        <th id="Description" align="left"><bean:message key="cs.description"/></th>
        <th id="Access" align="left"><bean:message key="cs.document.access.role"/></th>
        <th id="Action" align="left"><bean:message key="cs.actions"/></th>
      </tr>

      <!--start groups iteration here-->
      <logic:iterate id="oneGroup" name="groupListView" property="groupDTOList" indexId="index">
           
        <tr class='<%=index.intValue() % 2 == 0 ? "listEven" : "listOdd"%>'> 
          <td headers="Name">
            <html:link page="/cs/groupView.do" name="oneGroup" property="urlParams"><bean:write name="oneGroup" property="friendlyName" /></html:link>
          </td>
    
          <td headers="Description">
            <bean:write name="oneGroup" property="description" />
          </td>

          <td headers="Access">
	          <logic:equal name="oneGroup" property="documentAccessRole" value="3">
	            <bean:message key="cs.document.editor"/>
	          </logic:equal>
	          <logic:equal name="oneGroup" property="documentAccessRole" value="2">
	            <bean:message key="cs.document.author"/>
	          </logic:equal>
	          <logic:equal name="oneGroup" property="documentAccessRole" value="1">
	            <bean:message key="cs.document.reader"/>
	          </logic:equal>
	          <logic:equal name="oneGroup" property="documentAccessRole" value="0">
	            <bean:message key="cs.document.no.access"/>
	          </logic:equal>
          </td>

          <td headers="Action" nowrap align="left">
            <html:link page="/cs/groupEdit.do" name="oneGroup" property="urlParams"><html:img page="/cs/images/action/icon_edit.gif" styleClass="actionIcon" altKey="button.edit" border="0"/></html:link>
            <logic:notEqual name="oneGroup" property="systemGroup" value="true">
              <html:link page="/cs/groupDelete.do" name="oneGroup" property="urlParams" onclick="return confirmDeleteGroup()"><html:img page="/cs/images/action/icon_delete.gif" styleClass="actionIcon" altKey="button.delete" border="0"/></html:link>
            </logic:notEqual>
          </td>
        </tr>
      </logic:iterate>
      <!--end groups alteration here-->

    </table>
    
    </div>

    </td>
  </tr>
</table>
<!--end zone 5 content here -->  


